package com.example.mallsystem1104.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mallsystem1104.entity.Cart;
import com.example.mallsystem1104.mapper.CartMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author zy
 * @Date 2024/12/12 11:37
 * @packageName:com.example.mallsystem1104.service
 * @ClassName:CartService
 */
@Service
public class CartService extends ServiceImpl<CartMapper, Cart> {
    @Resource
    private CartMapper cartMapper;

    public List<Map<String, Object>> selectByUserId(Long userId) {
        return cartMapper.selectByUserId(userId);
    }
}
